package com.jade.shoesmallinterface.service.impl;

import com.jade.shoesmallinterface.entity.Order;
import com.jade.shoesmallinterface.mapper.OrderMapper;
import com.jade.shoesmallinterface.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OrderServiceIml implements OrderService {
    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> selectOrdersByUserId(Integer user_id) {
        return orderMapper.selectOrdersByUserId(user_id);
    }

    @Override
    public int insertOrder(Order order) {
        return orderMapper.insertOrder(order);
    }

    @Override
    public int updateOrder(Integer id, Order order) {
        return orderMapper.updateOrder(id, order);
    }
}